LOCAL_PATH:= $(call my-dir)
#ARCH=arm64-v8a armeabi armeabi-v7a mips mips64 x86 x86_64
#ARCH=x86_64
ARCH:=armeabi-v7a
#APP_ALLOW_MISSING_DEPS=true
include $(CLEAR_VARS)
 
LOCAL_MODULE:= libxosip
LOCAL_SRC_FILES:=$(LOCAL_PATH)/$(ARCH)/libosip.a 
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
		tools/sip_reg.c \
		src/eXsubscription_api.c \
		src/eXregister_api.c \
		src/jevents.c \
		src/jcallback.c \
		src/eXtl_tcp.c \
		src/rijndael.c \
		src/jreg.c \
		src/sdp_offans.c \
		src/eXconf.c \
		src/jauth.c \
		src/udp.c \
		src/eXcall_api.c \
		src/eXtl_tls.c \
		src/jdialog.c \
		src/eXtransport.c \
		src/eXosip.c \
		src/jrequest.c \
		src/jsubscribe.c \
		src/eXtl_dtls.c \
		src/jcall.c \
		src/misc.c \
		src/milenage.c \
		src/jresponse.c \
		src/eXmessage_api.c \
		src/eXtl_udp.c \
		src/eXoptions_api.c \
		src/eXinsubscription_api.c \
		src/eXutils.c \
		src/jpipe.c \
		src/jpublish.c \
		src/eXpublish_api.c \
		src/jnotify.c \
		src/inet_ntop.c
 
LOCAL_CFLAGS += -DHAVE_FCNTL_H \
				-DHAVE_TIME_H \
				-DHAVE_SYS_SELECT_H \
				-DENABLE_TRACE \
				-DOSIP_MT \
				-DHAVE_ARPA_INET_H \
				-DHAVE_NETDB_H
 
LOCAL_C_INCLUDES:= $(LOCAL_PATH)/include $(LOCAL_PATH)/src
LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_C_INCLUDES)
 
LOCAL_SHARED_LIBRARIES := \
        libxosip 
 
#LOCAL_LDLIBS += -lpthread -ldl
 
LOCAL_PRELINK_MODULE := false
 
LOCAL_MODULE:= libexosip
 
include $(BUILD_STATIC_LIBRARY)
#$(call import-add-path, $(LOCAL_PATH))
#$(call import-module,arm64-v8a/libosip)
